package com.lmscn.lms.api.controller;

import java.util.HashMap;
import java.util.Map;

import com.jfinal.core.Controller;
import com.lmscn.lms.api.model.Teacher;
import com.lmscn.lms.api.util.JsonKit;
import com.lmscn.lms.commons.GlobalConst;

public class TeacherController extends Controller {
	private static final int RECOMMENT_TEACHER_COUNT = 5;
	public void getRecommentTeacher(){
		Map<String, Object> dataMap = new HashMap<String, Object>();
		dataMap.put("recommentTeachers", Teacher.dao.getLastestTeachers(RECOMMENT_TEACHER_COUNT));
		renderJson(JsonKit.mapToJson(dataMap, GlobalConst.DEFAULT_DEPTH));
	}
}
